﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmEmpresa.aspx.cs" Inherits="frmEmpresa" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style3
        {
            font-weight: normal;
        }
        .style47
        {
            
            top: -34px;
            left: 679px;
position: absolute;
            z-index: 1;
        }
        .style68
        {
            position: absolute;
            top: 239px;
            left: 543px;
            z-index: 1;
            width: 129px;
        }
        .style70
        {
            top: 246px;
            left: 526px;
            position: absolute;
            z-index: 1;
        }
        .style77
        {
            top: 239px;
            left: 331px;
            position: absolute;
            z-index: 1;
        }
        .style78
        {
            top: 166px;
            left: 207px;
            position: absolute;
            z-index: 1;
        }
        .style79
        {
            top: 580px;
            left: 604px;
            position: absolute;
            z-index: 1;
            width: 190px;
        }
        .style80
        {
            top: 656px;
            left: 200px;
            position: absolute;
            z-index: 1;
            width: 1092px;
            height: 30px;
        }
        .style82
        {
            top: 435px;
            left: 328px;
            position: absolute;
            z-index: 1;
        }
        .style83
        {
            top: 244px;
            left: 1147px;
            position: absolute;
            z-index: 1;
            width: 91px;
        }
        .style84
        {
            top: 272px;
            left: 814px;
            position: absolute;
            z-index: 1;
        }
        .style85
        {
            top: 365px;
            left: 816px;
            position: absolute;
            z-index: 1;
            width: 297px;
            height: 26px;
        }
        .style86
        {
            top: 548px;
            left: 1111px;
            position: absolute;
            z-index: 1;
            height: 30px;
        }
        .style87
        {
            top: 549px;
            left: 604px;
            position: absolute;
            z-index: 1;
        }
        .style89
        {
            top: 428px;
            left: 422px;
            position: absolute;
            z-index: 1;
            width: 201px;
        }
        .style90
        {
            top: 578px;
            left: 1111px;
            position: absolute;
            z-index: 1;
        }
        .style91
        {
            top: 398px;
            left: 327px;
            position: absolute;
            z-index: 1;
            right: 262px;
            width: 304px;
            height: 29px;
        }
        .style92
        {
            top: 294px;
            left: 329px;
            position: absolute;
            z-index: 1;
            width: 319px;
        }
        .style93
        {
            top: 243px;
            left: 813px;
            position: absolute;
            z-index: 1;
        }
        .style95
        {
            top: 433px;
            left: 632px;
            position: absolute;
            z-index: 1;
        }
        .style96
        {
            top: 330px;
            left: 654px;
            position: absolute;
            z-index: 1;
        }
        .style97
        {
            top: 330px;
            left: 209px;
            position: absolute;
            z-index: 1;
        }
        .style98
        {
            top: 397px;
            left: 232px;
            position: absolute;
            z-index: 1;
            width: 92px;
            height: 19px;
        }
        .style99
        {
            top: 274px;
            left: 979px;
            position: absolute;
            z-index: 1;
            width: 131px;
        }
        .style100
        {
            top: 464px;
            left: 327px;
            position: absolute;
            z-index: 1;
        }
        .style101
        {
            top: 298px;
            left: 242px;
            position: absolute;
            z-index: 1;
        }
        .style102
        {
            top: 326px;
            left: 328px;
            position: absolute;
            z-index: 1;
        }
        .style103
        {
            top: 308px;
            left: 746px;
            position: absolute;
            z-index: 1;
            width: 64px;
        }
        .style104
        {
            top: 208px;
            left: 222px;
            position: absolute;
            z-index: 1;
            font-size: medium;
            text-decoration: underline;
        }
        .style105
        {
            top: 361px;
            left: 270px;
            position: absolute;
            z-index: 1;
            width: 47px;
            height: 21px;
        }
        .style106
        {
            top: 432px;
            left: 260px;
            position: absolute;
            z-index: 1;
            width: 54px;
            height: 25px;
        }
        .style107
        {
            top: 368px;
            left: 752px;
            position: absolute;
            z-index: 1;
            width: 54px;
            height: 20px;
        }
        .style108
        {
            top: 341px;
            left: 755px;
            position: absolute;
            z-index: 1;
        }
        .style109
        {
            top: 468px;
            left: 277px;
            position: absolute;
            z-index: 1;
        }
        .style110
        {
            top: 270px;
            left: 356px;
            position: absolute;
            z-index: 1;
        }
        .style111
        {
            top: 212px;
            left: 776px;
            position: absolute;
            z-index: 1;
            font-size: medium;
            text-decoration: underline;
        }
        .style112
        {
            top: 391px;
            left: 773px;
            position: absolute;
            z-index: 1;
        }
        .style113
        {
            top: 245px;
            left: 1113px;
            position: absolute;
            z-index: 1;
        }
        .style114
        {
            top: 276px;
            left: 779px;
            position: absolute;
            z-index: 1;
        }
        .style115
        {
            top: 248px;
            left: 774px;
            position: absolute;
            z-index: 1;
        }
        .style116
        {
            top: 277px;
            left: 947px;
            position: absolute;
            z-index: 1;
        }
        .style117
        {
            top: 295px;
            left: 656px;
            position: absolute;
            z-index: 1;
        }
        .style122
        {
            top: 551px;
            left: 809px;
            position: absolute;
            z-index: 1;
        }
        .style123
        {
            top: 392px;
            left: 817px;
            position: absolute;
            z-index: 1;
            width: 296px;
            height: 27px;
        }
        .style124
        {
            top: 339px;
            left: 816px;
            position: absolute;
            z-index: 1;
            width: 297px;
            height: 27px;
        }
        .style125
        {
            top: 580px;
            left: 403px;
            position: absolute;
            z-index: 1;
        }
        .style127
        {
            top: 548px;
            left: 402px;
            position: absolute;
            z-index: 1;
        }
        .style128
        {
            width: 527px;
            height: 313px;
            position: absolute;
            top: 197px;
            left: 190px;
            z-index: 1;
        }
        .style129
        {
            width: 559px;
            height: 312px;
            position: absolute;
            top: 197px;
            left: 738px;
            z-index: 1;
        }
        .style130
        {
            width: 1104px;
            height: 79px;
            position: absolute;
            top: 531px;
            left: 193px;
            z-index: 1;
        }
        .style131
        {
            width: 1104px;
            height: 132px;
            position: absolute;
            top: 626px;
            left: 192px;
            z-index: 1;
        }
        .style132
        {
            top: 549px;
            left: 205px;
            position: absolute;
            z-index: 1;
            width: 91px;
        }
        .style133
        {
            top: 245px;
            left: 1147px;
            position: absolute;
            z-index: 1;
            width: 91px;
            height: 27px;
        }
        .style134
        {
            top: 579px;
            left: 205px;
            position: absolute;
            z-index: 1;
            width: 91px;
        }
        .style135
        {
            position: absolute;
            top: 2px;
            left: 6px;
            z-index: 1;
        }
        .style140
    {
        top: 46px;
        left: 26px;
        position: absolute;
        z-index: 1;
    }
        .style141
        {
            top: 469px;
            left: 631px;
            position: absolute;
            z-index: 1;
        }
        .style142
        {
            top: 249px;
            left: 1250px;
            position: absolute;
            z-index: 1;
        }
        .style144
        {
            position: absolute;
            top: 290px;
            left: 139px;
            z-index: 1;
        }
        .style145
        {
            position: absolute;
            top: 364px;
            left: 328px;
            z-index: 1;
            width: 300px;
            height: 30px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <h4>Menu</h4>
        <br>
        <p>
        <a href="frmEmpresa.aspx">Empresa</a>
        <br>
        <a href="frmListaDeEstablecimientos.aspx">Establecimientos</a>
        <br>
        <a href="frmContacto.aspx">Contactos</a>
        <br>
        <a href="frmEmpleados.aspx">Empleados</a>
        <br>
      
        </p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <br>  
        <asp:TextBox ID="TBCuit" runat="server" CssClass="style77" Width="194px" 
        Height="30px" BackColor="#DDEDEE"></asp:TextBox>
    <asp:Label ID="Label28" runat="server" CssClass="style105" Text="Estado"></asp:Label>
    <asp:Label ID="Label29" runat="server" CssClass="style98" Text="Condicion IVA"></asp:Label>
    <strong>
    <asp:Label ID="Label30" runat="server" CssClass="style104" Text="Empresa"></asp:Label>
    </strong>
    <asp:Label ID="Label31" runat="server" CssClass="style109" Text="E-Mail"></asp:Label>
    <asp:Label ID="Label32" runat="server" CssClass="style106" Text="Telefono"></asp:Label>
    <asp:Label ID="Label35" runat="server" CssClass="style114" Text="Piso:"></asp:Label>
    <asp:Label ID="Label36" runat="server" CssClass="style116" Text="Dpto:"></asp:Label>
    <asp:Label ID="Label37" runat="server" CssClass="style103" Text="Cod.Postal:"></asp:Label>
    <asp:Label ID="Label38" runat="server" CssClass="style108" Text="Provincia"></asp:Label>
    <asp:Label ID="Label39" runat="server" CssClass="style112" Text="Barrio"></asp:Label>
    <strong>
    <asp:Label ID="Label40" runat="server" CssClass="style111" Text="Domicilio"></asp:Label>
    </strong>
    <br> 
    <asp:Label ID="Label24" runat="server" CssClass="style78" Font-Bold="True" 
        Font-Size="Medium" ForeColor="Blue" 
        Text="Administracion Datos Empresas"></asp:Label>
    <asp:Panel ID="Panel1" runat="server" BorderStyle="Groove" CssClass="style128">
        <asp:Label ID="Label23" runat="server" CssClass="style140" 
            Text="Numero de Cuit:"></asp:Label>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate="TBMail" CssClass="style144" 
            ErrorMessage="Debe ingresar un E-Mail valido" Font-Bold="True" ForeColor="Red" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
            ValidationGroup="1"></asp:RegularExpressionValidator>
    </asp:Panel>
    <br> 
    <asp:Label ID="Label33" runat="server" CssClass="style115" Text="Calle:"></asp:Label>
    <asp:Label ID="Label34" runat="server" CssClass="style113" Text="Nro:"></asp:Label>
    <br> 
    <asp:Label ID="Label25" runat="server" CssClass="style101" Text="Razon Social:"></asp:Label>
    <asp:Label ID="Label26" runat="server" CssClass="style97" 
        Text="Nombre Comercial:"></asp:Label>
    <asp:Label ID="Label27" runat="server" CssClass="style107" Text="Localidad"></asp:Label>
    <br />
       <asp:Label ID="Label1" runat="server" CssClass="style110" Font-Bold="True" 
        Font-Size="Small" ForeColor="Red"></asp:Label>
    <asp:Panel ID="Panel2" runat="server" BorderStyle="Groove" CssClass="style129">
    </asp:Panel>
    <br />
        <asp:Button ID="Button1" runat="server" CssClass="style68" Height="30px" onclick="Button1_Click" 
            Text="Consultar Por CUIT" ValidationGroup="2" />
                    <br />
             <br />
        <asp:TextBox ID="TBNomComercial" runat="server" CssClass="style102" 
        Width="321px" Height="27px" 
                        ValidationGroup="1" BackColor="#DDEDEE"></asp:TextBox>
                    <span class="style3">
    <asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator2" CssClass="style70" 
        runat="server" ControlToValidate="TBCuit" 
                        ForeColor="Red" SetFocusOnError="True" ValidationGroup="1">*</asp:RequiredFieldValidator>
                    <br />
    </span>
        <asp:TextBox ID="TBRazonSocial" CssClass="style92" runat="server" Height="27px" 
                        ValidationGroup="1" BackColor="#DDEDEE"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" 
        runat="server" CssClass="style95"
                        ControlToValidate="TBNumTel" ForeColor="Red" SetFocusOnError="True" 
                        ValidationGroup="1">*</asp:RequiredFieldValidator>
             <br />
        <asp:DropDownList ID="DropLocalidad" runat="server" DataSourceID="DSLocalidad" 
            DataTextField="nombreLocalidad" DataValueField="idLocalidad" 
            CssClass="style85" BackColor="#DDEDEE" AutoPostBack="True" 
        Enabled="False" onselectedindexchanged="DropLocalidad_SelectedIndexChanged">
        </asp:DropDownList>
             <br />
                    <asp:DropDownList ID="DropDownList1" runat="server" 
        CssClass="style145" BackColor="#DDEDEE" Width="304px">
                        <asp:ListItem>Activo</asp:ListItem>
                        <asp:ListItem>Inactivo</asp:ListItem>
                    </asp:DropDownList>
                    <span class="style3">
                 <asp:RequiredFieldValidator 
                        ID="RequiredFieldValidator8" runat="server" 
        ControlToValidate="TBCalle" CssClass="style142"
                        ForeColor="Red" SetFocusOnError="True" ValidationGroup="1">*</asp:RequiredFieldValidator>
                    <br />
                    </span>
             <br />
        <asp:DropDownList ID="DropCondIva" runat="server" DataSourceID="DSIva" CssClass="style91"
            DataTextField="descripcionCondIva" DataValueField="idCondIva" 
        BackColor="#DDEDEE">
        </asp:DropDownList>
        <asp:TextBox ID="TBMail" runat="server" Width="298px" Height="28px" CssClass="style100"
                     BackColor="#DDEDEE"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 
        runat="server" CssClass="style96"
                        ControlToValidate="TBNomComercial" ForeColor="Red" SetFocusOnError="True" 
                        ValidationGroup="1">*</asp:RequiredFieldValidator>
        <asp:TextBox ID="TBDpto" runat="server" CssClass="style99" 
        Height="28px" BackColor="#DDEDEE"></asp:TextBox>
                    <br />
        <asp:DropDownList ID="DropTipoTel" runat="server" DataSourceID="DSTipoTel" CssClass="style82"
            DataTextField="descripcionTipoTelefono" DataValueField="idTipoTelefono" 
            Height="27px" BackColor="#DDEDEE">
        </asp:DropDownList>
        <asp:TextBox ID="TBNumTel" runat="server" Height="27px" CssClass="style89"
            ValidationGroup="1" BackColor="#DDEDEE"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" CssClass="style117"
            ControlToValidate="TBRazonSocial" ForeColor="Red" SetFocusOnError="True" 
            ValidationGroup="1">*</asp:RequiredFieldValidator>
             <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
             <asp:Panel ID="Panel3" runat="server" BorderStyle="Groove" 
        CssClass="style130">
    </asp:Panel>
             <br />
    <br />
        <asp:TextBox ID="TBCalle" runat="server" Width="296px" Height="28px" CssClass="style93"
                     BackColor="#DDEDEE" ValidationGroup="1"></asp:TextBox>
                 <span class="style3">
    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" CssClass="style141"
                        runat="server" ControlToValidate="TBMail" ForeColor="Red" 
                        SetFocusOnError="True" ValidationGroup="1">*</asp:RequiredFieldValidator>
                 </span>
        <asp:TextBox ID="TBPiso" runat="server" CssClass="style84" Width="126px" 
        Height="28px" BackColor="#DDEDEE"></asp:TextBox>
             <br />
        <span class="style3"> 
        <asp:DropDownList ID="DropProvincia" runat="server" 
        DataSourceID="DSProvincia" CssClass="style124"
            DataTextField="nombreProvincia" DataValueField="idProvincia" 
        BackColor="#DDEDEE" AutoPostBack="True" 
        onselectedindexchanged="DropProvincia_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:DropDownList ID="DropBarrio" runat="server" DataSourceID="DSBarrio" CssClass="style123"
            DataTextField="nombreBarrio" DataValueField="idBarrio" 
        BackColor="#DDEDEE" AutoPostBack="True" Enabled="False" 
        EnableTheming="True" style="z-index: 11">
        </asp:DropDownList>
             <br />
        <asp:TextBox ID="TBNumCasa" runat="server" CssClass="style133" 
        BackColor="#DDEDEE" CausesValidation="True" ValidationGroup="1"></asp:TextBox>
        <asp:TextBox ID="TBCodPostal" runat="server" Height="28px" CssClass="style83
        "
                     BackColor="#DDEDEE" 
        style="left: 814px; top: 303px; width: 126px"></asp:TextBox>
                 </span>
             <br />
              <asp:Button ID="Button3" runat="server" Text="Modificar Empresa" CssClass="style127"
            onclick="Button3_Click" Height="27px" Width="190px" Enabled="False" 
                     ViewStateMode="Enabled" />
             <asp:Panel ID="Panel4" runat="server" BorderStyle="Groove" 
        CssClass="style131">
                 <asp:Label ID="Label41" runat="server" 
    CssClass="style135" Text="Contactos:" Font-Bold="True"></asp:Label>
    </asp:Panel>
   
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" CssClass="style132"
            Text="Registrar Empresa" Height="27px" Width="190px" ValidationGroup="1" 
                        Enabled="False" />
                   
       
                   
            
            
        <asp:Button ID="Button7" runat="server" Text="Ver Contactos" CssClass="style122"
            onclick="Button7_Click" Height="27px" Width="190px" Enabled="False" 
        Visible="False" />
          
                    <asp:Button ID="Button11" CssClass="style86" runat="server" Height="27px" onclick="Button11_Click" 
                        Text="Emitir Autorizacion" Width="187px" Enabled="False" />
       
             
                    <asp:Button ID="Button9" runat="server" CausesValidation="False" Height="27px" 
                        onclick="Button9_Click" Text="Listar Empresas" Width="190px" CssClass="style134"
                      />
                    &nbsp;<asp:Button ID="Button8" runat="server" CssClass="style125"
            onclick="Button8_Click" Text="Registrar Establecimiento" Height="27px" 
            Width="189px" Enabled="False" />
                   
             
        <asp:Button ID="Button6" runat="server" CssClass="style87"
            onclick="Button6_Click" Text="Asignar Contacto" Height="27px" 
            Width="189px" Enabled="False" />
            
                    <asp:Button ID="Button12" runat="server" Height="27px" onclick="Button12_Click" 
                      CssClass="style90"  Text="Emitir Solicitud de RNE" Width="187px" 
                        Enabled="False" />
             
       
         
       
            
    <p>
        <asp:Button ID="Button13" runat="server" Height="27px" onclick="Button13_Click" 
           CssClass="style79" Text="Limpiar Campos" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="#003366"></asp:Label>
        <asp:Button ID="Button10" runat="server" CssClass="style47"
            CausesValidation="False" onclick="Button10_Click" Text="Regresar" 
            Height="30px" Width="187px" Visible="False" />
        </span>
    </p>
    
        <asp:GridView ID="GridContactos" runat="server" AutoGenerateColumns="False" CssClass="style80"
            DataSourceID="DSContactos" AllowPaging="True" 
            BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" 
            CellPadding="3" CellSpacing="1" GridLines="None" 
                    onselectedindexchanged="GridContactos_SelectedIndexChanged" 
            PageSize="3" EmptyDataText="No Hay Datos Para Mostrar">
            <Columns>
                <asp:BoundField DataField="nombreComercial" HeaderText="Empresa" 
                    SortExpression="nombreComercial" />
                <asp:BoundField DataField="numDocumento" HeaderText="DNI" 
                    SortExpression="numDocumento" />
                <asp:BoundField DataField="nombre" HeaderText="Nombre" 
                    SortExpression="nombre" />
                <asp:BoundField DataField="apellido" HeaderText="Apellido" 
                    SortExpression="apellido" />
                <asp:BoundField DataField="dirCorreo" HeaderText="EMail" 
                    SortExpression="dirCorreo" />
                <asp:BoundField DataField="numTelefono" HeaderText="Telefono" 
                    SortExpression="numTelefono" />
                <asp:BoundField DataField="calle" HeaderText="Calle" SortExpression="calle" />
                <asp:BoundField DataField="numeroCalle" HeaderText="Nro" 
                    SortExpression="numeroCalle" />
                <asp:BoundField DataField="piso" HeaderText="Piso" SortExpression="piso" />
                <asp:BoundField DataField="departamento" HeaderText="Dpto" 
                    SortExpression="departamento" />
                <asp:BoundField DataField="nombreBarrio" HeaderText="Barrio" 
                    SortExpression="nombreBarrio" />
                <asp:BoundField DataField="nombreLocalidad" HeaderText="Localidad" 
                    SortExpression="nombreLocalidad" />
                <asp:BoundField DataField="nombreProvincia" HeaderText="Provincia" 
                    SortExpression="nombreProvincia" />
                <asp:BoundField DataField="observaciones" HeaderText="observaciones" 
                    SortExpression="observaciones" />
            </Columns>
            <EmptyDataRowStyle BackColor="#DDEDEE" HorizontalAlign="Center" />
            <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
            <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#594B9C" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#33276A" />
        </asp:GridView>
            
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        DisplayMode="SingleParagraph" 
        HeaderText="Debe Completar todos los campos obligatorios (*)" 
        ShowMessageBox="True" ShowSummary="False" ValidationGroup="1" 
        Width="645px" />
    <p>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label22" 
            runat="server" Text="Label" Visible="False"></asp:Label>
        <asp:ScriptManager 
            ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        </p>
   
    <p>
<asp:SqlDataSource ID="DSIva" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [T_CondIva]where habilitado &gt; 0" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"></asp:SqlDataSource>
        <asp:SqlDataSource ID="DSBarrio" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
            SelectCommand="SELECT T_Barrio.idBarrio, T_Barrio.nombreBarrio, T_Barrio.idLocalidad, T_Barrio.habilitado, T_Localidad.idLocalidad AS Expr1 FROM T_Barrio INNER JOIN T_Localidad ON T_Barrio.idLocalidad = T_Localidad.idLocalidad WHERE (T_Barrio.habilitado &gt; 0) AND T_Barrio.idLocalidad = @localidad">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropLocalidad" DefaultValue="" 
                    Name="localidad" PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSBarrio2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT idBarrio, nombreBarrio, idLocalidad, habilitado FROM T_Barrio">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSContactos" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
            
            SelectCommand="SELECT T_Contacto.numDocumento, T_Contacto.nombre, T_Contacto.apellido, T_Contacto.dirCorreo, T_Contacto.numTelefono, T_Contacto.observaciones, T_Contacto.calle, T_Contacto.numeroCalle, T_Contacto.piso, T_Contacto.departamento, T_Empresa.nombreComercial, T_Barrio.nombreBarrio, T_Localidad.nombreLocalidad, T_Provincia.nombreProvincia, T_Contacto.idContacto, T_Contacto.cuit FROM T_Contacto INNER JOIN T_Barrio ON T_Contacto.idBarrio = T_Barrio.idBarrio INNER JOIN T_Localidad ON T_Contacto.idLocalidad = T_Localidad.idLocalidad INNER JOIN T_Provincia ON T_Contacto.idProvincia = T_Provincia.idProvincia INNER JOIN T_Empresa ON T_Contacto.cuit = T_Empresa.cuit WHERE (T_Contacto.cuit = @cuit)" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>">
            <SelectParameters>
                <asp:ControlParameter ControlID="TBCuit" Name="cuit" PropertyName="Text" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSTipoTel" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [T_TipoTelefono]where habilitado &gt; 0" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"></asp:SqlDataSource>
        <asp:SqlDataSource ID="DSLocalidad" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT T_Localidad.idLocalidad, T_Localidad.nombreLocalidad, T_Localidad.idProvincia, T_Localidad.habilitado, T_Provincia.idProvincia AS Expr1 FROM T_Localidad INNER JOIN T_Provincia ON T_Localidad.idProvincia = T_Provincia.idProvincia WHERE (T_Localidad.habilitado &gt; 0) AND (T_Localidad.idProvincia = @provincia)" 
            ProviderName="System.Data.SqlClient">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropProvincia" DefaultValue="1" 
                    Name="provincia" PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSProvincia" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [T_Provincia]where habilitado &gt; 0" 
            ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
        <asp:SqlDataSource ID="DSEmpresa" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            InsertCommand="INSERT INTO T_Empresa(cuit, razonSocial, nombreComercial, dirCorreo, dirWeb, numTelefono, idTipoTelefono, idCondIva, calle, piso, numeroCalle, departamento, idBarrio, idLocalidad, idProvincia, idPais, codPostal, estado) VALUES (@cuit, @razonSocial, @nombreComercial, @dirCorreo, @dirWeb, @numTelefono, @idTipoTelefono, @idCondIva, @calle, @piso, @numeroCalle, @departamento, @idBarrio, @idLocalidad, @idProvincia, @idPais, @codPostal,@estado) " 
            SelectCommand="SELECT cuit AS Expr1, razonSocial AS Expr2, nombreComercial AS Expr3, dirCorreo AS Expr4, dirWeb AS Expr5, numTelefono AS Expr6, idTipoTelefono AS Expr7, idCondIva AS Expr8, calle AS Expr9, numeroCalle AS Expr10, piso AS Expr11, departamento AS Expr12, codPostal AS Expr13, idBarrio AS Expr14, idLocalidad AS Expr15, idProvincia AS Expr16, idPais AS Expr17, estado AS Expr18, T_Empresa.* FROM T_Empresa WHERE (cuit = @cuit)" 
            
            
            
            
            
            
            
            
            
            UpdateCommand="UPDATE T_Empresa SET razonSocial = @razonSocial, nombreComercial = @nombreComercial, dirCorreo = @dirCorreo, dirWeb = @dirWeb, numTelefono = @numTelefono, idTipoTelefono = @idTipoTelefono, idCondIva = @idCondIva, calle = @calle, numeroCalle = @numeroCalle, piso = @piso, departamento = @departamento, cuit = @cuit, codPostal = @codPostal, idBarrio = @idBarrio, idLocalidad = @idLocalidad, idPais = @idPais, idProvincia = @idProvincia, estado =@estado  WHERE (cuit = @cuit)" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>">
            <InsertParameters>
                <asp:Parameter Name="cuit" />
                <asp:Parameter Name="razonSocial" />
                <asp:Parameter Name="nombreComercial" />
                <asp:Parameter Name="dirCorreo" />
                <asp:Parameter Name="dirWeb" />
                <asp:Parameter Name="numTelefono" />
                <asp:Parameter Name="idTipoTelefono" />
                <asp:Parameter Name="idCondIva" />
                <asp:Parameter Name="calle" />
                <asp:Parameter Name="piso" />
                <asp:Parameter Name="numeroCalle" />
                <asp:Parameter Name="departamento" />
                <asp:Parameter Name="idBarrio" />
                <asp:Parameter Name="idLocalidad" />
                <asp:Parameter Name="idProvincia" />
                <asp:Parameter Name="idPais" />
                <asp:Parameter Name="codPostal" />
                <asp:Parameter Name="estado" />
            </InsertParameters>
            <SelectParameters>
                <asp:Parameter Name="cuit" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="razonSocial" />
                <asp:Parameter Name="nombreComercial" />
                <asp:Parameter Name="dirCorreo" />
                <asp:Parameter Name="dirWeb" />
                <asp:Parameter Name="numTelefono" />
                <asp:Parameter Name="idTipoTelefono" />
                <asp:Parameter Name="idCondIva" />
                <asp:Parameter Name="calle" />
                <asp:Parameter Name="numeroCalle" />
                <asp:Parameter Name="piso" />
                <asp:Parameter Name="departamento" />
                <asp:Parameter Name="cuit" />
                <asp:Parameter Name="codPostal" />
                <asp:Parameter Name="idBarrio" />
                <asp:Parameter Name="idLocalidad" />
                <asp:Parameter Name="idPais" />
                <asp:Parameter Name="idProvincia" />
                <asp:Parameter Name="estado" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DSLocalidad2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT T_Localidad.* FROM T_Localidad"></asp:SqlDataSource>
</p>
</asp:Content>

